from typing import List, Dict, Tuple, Set, Optional, Union, Any

# 列表类型
names: List[str] = ["Alice", "Bob", "Charlie"]

# 字典类型
user_data: Dict[str, int] = {"Alice": 30, "Bob": 25}

# 元组类型
coordinates: Tuple[float, float] = (10.5, 20.3)
# 可变长度元组
records: List[Tuple[str, int, bool]] = [("Alice", 30, True), ("Bob", 25, False)]

# 集合类型
unique_ids: Set[int] = {1, 2, 3, 4}

# 可选类型 (可以是指定类型或None)
maybe_name: Optional[str] = None  # 等同于 Union[str, None]

# 联合类型 (可以是多种类型之一)
id_or_name: Union[int, str] = "user123"

# 任意类型
anything: Any = 42  # 可以是任何类型